/*
 * Vector_Class.h
 *
 * Created: 1/22/2013 2:23:50 PM
 *  Author: Alexander
 */ 


#ifndef VECTOR_CLASS_H_
#define VECTOR_CLASS_H_

#include <stdint.h>
#include <stdlib.h>
#include <avr/io.h>
#include <alloca.h>

typedef struct {
	int16_t AXIS_X;
	int16_t AXIS_Y;
	int16_t AXIS_Z;
	int16_t count;
} AxesVector_t, *AxesVector_ptr;

void Vector_Init(AxesVector_t* vector);
int16_t Get_X(AxesVector_t* vector);
int16_t Get_Y(AxesVector_t* vector);
int16_t Get_Z(AxesVector_t* vector);
int16_t Get_Count(AxesVector_t* vector);

void Update_X(AxesVector_t* vector, int16_t newVal);
void Update_Y(AxesVector_t* vector, int16_t newVal);
void Update_Z(AxesVector_t* vector, int16_t newVal);
void Increment_Count(AxesVector_t* vector);
void Update_Values(AxesVector_t* vector, int16_t x, int16_t y, int16_t z);

void Copy_Vector(AxesVector_t* dest, AxesVector_t* source);
void Add_Vectors(AxesVector_t* dest, AxesVector_t* vect_2);
void Scalar_Multiply(AxesVector_t* vector, int16_t scalar);
void Scalar_Divide(AxesVector_t* vector, int16_t scalar);
AxesVector_ptr New_Vector();
#endif /* VECTOR_CLASS_H_ */